package utils

import (
	"crypto/md5"
	"encoding/hex"
	"github.com/google/uuid"
)

func UUID() string {
	return uuid.Must(uuid.NewRandom()).String()
}

func ToMd5(str string) string {
	m := md5.New()
	m.Write([]byte(str))
	return hex.EncodeToString(m.Sum(nil))
}